package gateway.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener;
import org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent;
@Configuration
public class NacosConfigListener {
    
    private static final Logger logger = LoggerFactory.getLogger(NacosConfigListener.class);

    @EventListener
    public void onRefreshScopeRefreshed(RefreshScopeRefreshedEvent event) {
        logger.info("Nacos配置已刷新，正在重新加载配置...");
    }

    @EventListener
    public void onApplicationEvent(RefreshScopeRefreshedEvent event) {
        logger.info("配置刷新完成，当前配置已更新");
    }
} 